package com.wqz.tacos.models;

import javax.validation.constraints.Size;
import javax.validation.constraints.NotNull;
import lombok.Data;
import java.util.List;

@Data
public class Taco {
    // validation 需要在pom中手动引入
    // end::allButValidation[]
    @NotNull
    @Size(min=5,message = "Name must be at least 5 characters long")
    // tag::allButValidation[]
    private String name;

    // end::allButValidation[]
    @Size(min = 1, message = "You must be at least 1 ingredient")
    // tag::allButValidation[]
    private List<String> ingredients;
}
